import {fetchChannelAPI, type ChannelItem} from '@/apis/list'
import { useEffect, useState } from 'react'


export function useTabs(){
    const [channels, setChannels] = useState<ChannelItem[]>([])

    useEffect(() => {
        const getChannels = async () => {
            const res = await fetchChannelAPI()
            setChannels(res.data.data.channels)
        }
        getChannels()
    }, [])
    return {channels}
}